'use strict';
const config = require('../config/config');
const Sequelize = require('sequelize');
//mysql数据库链接
exports.sequelize = function () {
  return new Sequelize(config.xcxjusekj.database, config.xcxjusekj.username, config.xcxjusekj.password, {
    host: config.xcxjusekj.host,
    dialect: config.xcxjusekj.dialect,
    pool: config.pool,
    dialectOptions: {
      charset: "utf8mb4",
      supportBigNumbers: true,
      bigNumberStrings: true
    },
    logging: config.xcxjusekj.logging,
    operatorsAliases: config.operatorsAliases,
    port: config.xcxjusekj.port,
    timezone: '+08:00'
  })
}()
